home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / go / games / problems.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  1993-06-20  |  10.9 KB  |  506 lines

  1. #! /bin/sh
  2. # This is a shell archive, meaning:
  3. # 1. Remove everything above the #! /bin/sh line.
  4. # 2. Save the resulting text in a file.
  5. # 3. Execute the file with /bin/sh (not csh) to create:
  6. #    prob.01
  7. #    prob.02
  8. #    prob.03
  9. #    prob.04
  10. #    prob.05
  11. #    prob.06
  12. #    prob.07
  13. #    prob.08
  14. #    prob.09
  15. #    prob.10
  16. #    prob.11
  17. #    prob.12
  18. # This archive created: Mon May 13 19:49:20 1991
  19. export PATH; PATH=/bin:/usr/bin:$PATH
  20. if test -f 'prob.01'
  21. then
  22.     echo shar: "will not over-write existing file 'prob.01'"
  23. else
  24. cat << \SHAR_EOF > 'prob.01'
  25. (
  26. ;
  27. GaMe[1]
  28. VieW[]
  29. SiZe[19]
  30. Comment[Black to play (about 7 kyu)
  31.  
  32. Problem 112 from Maeda I, pg 77
  33.  
  34. Solution follows.]
  35. AddEmpty[bi][bo][cn][cp][dl]
  36. White[ag][ah][bg][bh][bj][bk][bl][bm][ci][cj][dk]
  37. Black[af][bf][bn][cf][cg][ch][ck][cl][cm][co][di][dj]
  38. ;
  39. Black[ai]
  40. ;
  41. White[aj]
  42. ;
  43. Black[bi]
  44. ;
  45. White[bh]
  46. ;
  47. Black[am]
  48. )
  49. SHAR_EOF
  50. fi
  51. if test -f 'prob.02'
  52. then
  53.     echo shar: "will not over-write existing file 'prob.02'"
  54. else
  55. cat << \SHAR_EOF > 'prob.02'
  56. (
  57. ;
  58. GaMe[1]
  59. VieW[]
  60. SiZe[19]
  61. Comment[While to play (about 8 kyu)
  62.  
  63. Problem 113 from Maeda I, pg 77
  64.  
  65. Solution follows.]
  66. AddEmpty[lc]
  67. White[lb][ld][mc][nb][nd][ne][ob][oe][pe][qe][rc][rd][re][sb]
  68. Black[mb][nc][oc][od][pb][pd][qc][qd][ra][rb]
  69. ;
  70. White[pa]
  71. ;
  72. Black[qa]
  73. ;
  74. Comment[Ko.
  75.  
  76. This is the best white can do.
  77. ]
  78. White[na]
  79. )
  80. SHAR_EOF
  81. fi
  82. if test -f 'prob.03'
  83. then
  84.     echo shar: "will not over-write existing file 'prob.03'"
  85. else
  86. cat << \SHAR_EOF > 'prob.03'
  87. (
  88. ;
  89. GaMe[1]
  90. VieW[]
  91. SiZe[19]
  92. Comment[Black to play (about 6 kyu)
  93.  
  94. Problem 114 from Maeda I, pg 77
  95.  
  96. Solution follows.
  97. ]
  98. Black[lr][np][nq][nr][op][pp][qp][rp]
  99. White[ns][oq][or][pq][qq][sr]
  100. ;
  101. Black[ps]
  102. (
  103. ;
  104. White[rr]
  105. ;
  106. Black[rs]
  107. )
  108. (
  109. ;
  110. White[os]
  111. (
  112. ;
  113. Black[rq]
  114. ;
  115. White[rr]
  116. ;
  117. Black[qr]
  118. )
  119. (
  120. ;
  121. Black[rs]
  122. ;
  123. Comment[Seki. ]
  124. White[qr]
  125. )
  126. )
  127. )
  128. SHAR_EOF
  129. fi
  130. if test -f 'prob.04'
  131. then
  132.     echo shar: "will not over-write existing file 'prob.04'"
  133. else
  134. cat << \SHAR_EOF > 'prob.04'
  135. (
  136. ;
  137. GaMe[1]
  138. VieW[]
  139. SiZe[19]
  140. Comment[This is a tsume-go problem composed by the great Meijin Inoue Dosetsu Inseki for the first eidtion of his classic work "Hatsuyoron" in 1713.
  141.  
  142. Fujisawa Shuko said that this may be the greatest masterpiece ever.  He also called it "frightening." 
  143.  
  144. Black to play and win.
  145.  
  146. \(Posted by elil@sco.com\)]
  147. Black[aj][ak][al][am][bd][bf][bm][bp][bs][ce][co][cp][cr][de][dh][di][dn][ek][el][em][ep][fc][fe][fj][fn][fo][fq][hb][il][ko][lb][lc][ld][le][lj][lk][me][mf][mi][mn][ni][nr][ns][oe][of][og][oh][oi][oo][os][pe][ph][pi][pl][pp][pq][pr][ps][qh][ql][qm][qq][ra][rh][rk][rm][sh][sk][sp][sq]
  148. White[ah][ap][ar][bg][bj][bn][cd][cg][cj][cn][df][dg][dk][dl][en][eq][ff][gg][hc][hg][hi][hm][hp][ib][ir][jb][jd][jj][jk][jl][jm][jn][ke][kg][ki][kp][lg][lp][mb][mp][mr][ms][nd][ng][nj][od][oj][ok][on][op][or][pf][pj][qa][qc][qe][qj][qo][qp][rb][re][ri][rl][rn][ro][rq][si][sl][sm][sn][so]
  149. )
  150. SHAR_EOF
  151. fi
  152. if test -f 'prob.05'
  153. then
  154.     echo shar: "will not over-write existing file 'prob.05'"
  155. else
  156. cat << \SHAR_EOF > 'prob.05'
  157. (
  158. ;
  159. GaMe[1]
  160. VieW[]
  161. SiZe[19]
  162. Black[af][ag][bb][bc][bd][bk][bm][bn][bo][bp][bq][cb][cd][ce][cf][ck][cp][db][dd][df][dk][dl][dm][dn][do][dp][dq][ef][el][er][es][fb][fc][fd][fe][ff][fg][fl][fn][fo][fp][fq][fs][gg][gl][gm][gn][gs][hb][hc][he][hg][hh][hl][hs][ic][ie][ig][ih][ir][is][jc][je][jh][ji][jj][jk][jl][jm][js][kc][kd][ke][kf][kh][kn][ks][lc][lg][ll][ln][ls][mc][mf][mi][mk][mm][ms][nc][ne][ng][nh][nj][nk][nm][ns][oc][oe][og][ol][pe][pg][pk][pl][pr][ps][qe][qg][qr][re][rg][rr][rs][sr]
  163. White[ad][ae][ak][al][ar][be][bf][bg][bh][bi][bj][br][bs][cj][cr][da][dg][dh][dj][dr][ds][ea][eb][ec][eh][ej][ek][fa][fh][fk][fr][ga][gb][gc][gd][gh][gi][gk][go][gp][gq][gr][ha][hk][hn][ho][ib][ii][ij][ik][il][im][io][iq][ja][jb][jn][jp][jq][jr][kb][ko][kp][la][lb][lr][mb][mn][mo][mp][mq][mr][na][nb][of][oh][oi][oj][ok][om][on][oo][op][oq][or][os][pb][pc][ph][pq][qb][qd][qh][qj][ql][qm][qn][qo][qq][rc][rd][rh][ri][rj][rl][ro][rp][rq][sd][se][sf][sg][sk]
  164. Comment[A Very Challenging One Point Endgame Problem
  165.     
  166. Here is the problem I am most proud of.  I would be very interested, impressed and shocked if anyone (even a pro) solved this problem without a great deal of knowledge of Elwyn Berlekamp's research.  The problem should be equally challenging under all popular rules.
  167.  
  168. The problem is white to move and win.  Life and death is not an issue -- merely the one point endgame moves.
  169.  
  170. David Wolfe \(wolfe@mandolin.Berkely.edu\)]
  171. )
  172. SHAR_EOF
  173. fi
  174. if test -f 'prob.06'
  175. then
  176.     echo shar: "will not over-write existing file 'prob.06'"
  177. else
  178. cat << \SHAR_EOF > 'prob.06'
  179. (
  180. ;
  181. GaMe[1]
  182. VieW[]
  183. SiZe[19]
  184. White[kc][ke][le][mc][md][ne][oe][pd][qd][qf][re]
  185. Black[ic][ie][jf][kf][lf][me][mf][mg][nc][nd][pc][qc][rb][rd][sc]
  186. Comment[Here's a problem for the masses.  It's from a Chinese text, "Test Your Go Strength," by Rin Kai-ho (Lin Hai-feng).  This one is in the 8-kyu chapter, so it should not be *too* difficult:
  187.  
  188. "Widen your horizons:  White to move and live."
  189.  
  190. White is concerned with saving the five stones on the left.  There's move than one way to skin a cat, but there is only one elegant way to live here.
  191.     
  192. Roy Schmidt \(rschmidt@silver.ucs.indiana.edu\)]
  193. )
  194. SHAR_EOF
  195. fi
  196. if test -f 'prob.07'
  197. then
  198.     echo shar: "will not over-write existing file 'prob.07'"
  199. else
  200. cat << \SHAR_EOF > 'prob.07'
  201. (
  202. ;
  203. GaMe[1]
  204. VieW[]
  205. SiZe[19]
  206. Comment[Problem from Kato's 3-move Tsumego, page 51.
  207.  
  208. White to  play.
  209.  
  210. Solution follows.]
  211. White[bp][bq][br][bs][co][cs][do][dq][eo][fo][fp][fq][gq][iq]
  212. Black[cp][cq][cr][dp][ds][ep][eq][fr]
  213. ;
  214. White[fs]
  215. ;
  216. Black[gr]
  217. ;
  218. White[hr]
  219. (
  220. ;
  221. Black[gs]
  222. ;
  223. White[er]
  224. )
  225. (
  226. ;
  227. Black[es]
  228. ;
  229. White[dr]
  230. ;
  231. Black[er]
  232. ;
  233. White[gs]
  234. ;
  235. Black[hs]
  236. ;
  237. White[gs]
  238. )
  239. )
  240. SHAR_EOF
  241. fi
  242. if test -f 'prob.08'
  243. then
  244.     echo shar: "will not over-write existing file 'prob.08'"
  245. else
  246. cat << \SHAR_EOF > 'prob.08'
  247. (
  248. ;
  249. GaMe[1]
  250. VieW[]
  251. SiZe[19]
  252. Comment[Black to play (~5 kyu)
  253.  
  254. Solution follows]
  255. Black[jq][kr][lo][lp][lq][mo][no][oo][pn][pp][qp][qr][rr]
  256. White[lr][mp][mr][np][op][or][pq][pr][qs]
  257. ;
  258. Black[nq]
  259. ;
  260. White[mq]
  261. (
  262. ;
  263. Name[Success]
  264. Black[ls]
  265. ;
  266. White[ps]
  267. ;
  268. Letter[nr][ms]
  269. Comment[a and b are now miai to kill white.]
  270. Black[ns]
  271. )
  272. (
  273. ;
  274. Name[Failure]
  275. Black[ps]
  276. ;
  277. White[ls]
  278. ;
  279. Black[ns]
  280. ;
  281. White[nr]
  282. )
  283. )
  284. SHAR_EOF
  285. fi
  286. if test -f 'prob.09'
  287. then
  288.     echo shar: "will not over-write existing file 'prob.09'"
  289. else
  290. cat << \SHAR_EOF > 'prob.09'
  291. (
  292. ;
  293. GaMe[1]
  294. VieW[]
  295. SiZe[19]
  296. White[bq][br][cp][dp][dr][ds][ep][es][fs][gp][io][iq][ir]
  297. Black[bs][cq][cr][dq][eq][er][fr][gr][hr][hs]
  298. Comment[Problem from Kato's 3-move Tsumego, page 53.
  299.  
  300. White to play.
  301.  
  302. Solution follows.]
  303. ;
  304. White[cs]
  305. ;
  306. Black[gs]
  307. ;
  308. Comment[a and b are now miai.]
  309. Letter[cs][es]
  310. White[ds]
  311. )
  312. SHAR_EOF
  313. fi
  314. if test -f 'prob.10'
  315. then
  316.     echo shar: "will not over-write existing file 'prob.10'"
  317. else
  318. cat << \SHAR_EOF > 'prob.10'
  319. (
  320. ;
  321. GaMe[1]
  322. VieW[]
  323. SiZe[19]
  324. Black[ap][ar][bp][co][cr][dp][dq]
  325. White[ao][bm][bo][cn][dn][dr][ds][eo][ep][eq][fr]
  326. Comment[Problem from Kato's 3-move Tsumego, page 53.  
  327.  
  328. White to play.
  329.  
  330. Solution follows.]
  331. ;
  332. White[bs]
  333. (
  334. ;
  335. Black[cs]
  336. ;
  337. White[br]
  338. ;
  339. Black[cq]
  340. ;
  341. White[bq]
  342. ;
  343. Black[aq]
  344. ;
  345. White[do]
  346. ;
  347. Black[as]
  348. ;
  349. White[br]
  350. )
  351. (
  352. ;
  353. Black[br]
  354. ;
  355. White[cs]
  356. (
  357. ;
  358. Black[bq]
  359. ;
  360. White[cq]
  361. )
  362. (
  363. ;
  364. Black[cp]
  365. ;
  366. White[bq]
  367. )
  368. (
  369. ;
  370. Black[do]
  371. ;
  372. White[cq]
  373. ;
  374. Black[cp]
  375. ;
  376. White[bq]
  377. )
  378. )
  379. )
  380. SHAR_EOF
  381. fi
  382. if test -f 'prob.11'
  383. then
  384.     echo shar: "will not over-write existing file 'prob.11'"
  385. else
  386. cat << \SHAR_EOF > 'prob.11'
  387. (
  388. ;
  389. GaMe[1]
  390. VieW[]
  391. SiZe[19]
  392. Comment[White to play and kill, avoiding ko and seki.
  393.  
  394. Solution follows.]
  395. AddBlack[ac][bd][be][ce][da][db][dc][dd][fd]
  396. AddWhite[ab][bb][ca][cb][cc][cd][cf][ch][de][df]
  397. ;
  398. White[ae]
  399. ;
  400. Black[bf]
  401. ;
  402. White[bg]
  403. ;
  404. Black[af]
  405. ;
  406. White[bc]
  407. ;
  408. Black[aa]
  409. ;
  410. White[ad]
  411. ;
  412. Black[ac]
  413. ;
  414. White[ad]
  415. )
  416. SHAR_EOF
  417. fi
  418. if test -f 'prob.12'
  419. then
  420.     echo shar: "will not over-write existing file 'prob.12'"
  421. else
  422. cat << \SHAR_EOF > 'prob.12'
  423. (
  424. ;
  425. GaMe[1]
  426. VieW[]
  427. SiZe[19]
  428. Comment[Here is a series of life and death problems.  They range from fairly easy to unbelievably difficult (perhaps the hardest problem I have ever seen).  The hard one is courtesy of Jimmy Cha, who showed it to me at the Fujitsu in SF recently.  He used it for betting, as follows:  you get to look at the problem for as long as you want, then when you think you have the answer, you bet Jimmy $1.  If you make a single mistake he keeps the $1, or if (ha-ha) you happen to have solved it correctly, he pays you $5.  Last time I checked he was $14 ahead.  Note that this means there must be a simple (but wrong) line of play which appears to succeed (but fails in a subtle way).  Anyway, I promise you LOTS of surprises in working this one out. 
  429.  
  430. Howard A. Landman]
  431.  
  432. (
  433. ;
  434. Name[Warm up \(easy\)]
  435. AddBlack[bp][bq][cr][dr][er]
  436. AddWhite[ao][bo][co][cp][cq][dq][eq][fq][fr][gs]
  437. Comment[BUT FIRST YOU NEED TO WARM UP
  438.  
  439. Let's start with something easy.  These problems are to be worked IN YOUR HEAD, as if you were seeing them in a real game.  No fair actually playing out the moves!
  440.  
  441. 1a. Black to play and live 
  442.  
  443. 2b. White to play and kill]
  444. ;
  445. Comment[Here is one answer for white.  Note that there is death in the hane.  Black is just dead here, nothing tricky at all!]
  446. White[es]
  447. )
  448. (
  449. ;
  450. Name[Problem 2 \(easy\)]
  451. AddBlack[bp][bq][cr][dr][er][fr]
  452. AddWhite[ao][bo][co][cp][cq][dq][eq][fq][fs][gq][gr][hs]
  453. Comment[But lengthen by one...
  454.  
  455. 2. White to play and kill]
  456. )
  457. (
  458. ;
  459. Name[Problem 3 \(medium\)]
  460. AddBlack[bp][bq][cr][dr][er][fr][gr]
  461. AddEmpty[iq]
  462. AddWhite[ao][bo][co][cp][cq][dq][eq][fq][gq][gs][hq][hr][is]
  463. Comment[Too easy, you say?  Sure, so let's try lengthening by one more...
  464.  
  465. 3. White to play and kill]
  466. )
  467. (
  468. ;
  469. Name[Final Problem \(HARD!\)]
  470. AddBlack[bp][bq][cr][dr][er][fr][gr][hr]
  471. AddWhite[ao][bo][co][cp][cq][dq][eq][fq][gq][hq][hs][iq][ir][js]
  472. Comment[Well, that took a bit longer now, didn't it?  But you got it, didn't you?  Good!  Then you're ready for the killer...
  473.  
  474. Lengthen by one more:
  475.  
  476. 4. White to play and kill
  477.  
  478. Some of you may be wondering, "Wait!  I just *barely* killed black in the *last* problem!  You want me to do it when he has one more space?"  But yes, it *is* possible! 
  479.  
  480. I tried using the Nemesis Tactical Wizard on this, but even with "unlimited" width, depth, and variations, it failed to even try the right first move! When shown the first move, it finds moves 2 and 3 but misses the best move 4. And so on ... until when shown the first 10 moves, it gives up, claiming Black is alive, only 3 moves away from the answer!  However, when shown the first 11 moves, it does correctly read out the final thrust...] 
  481. )
  482. (
  483. ;
  484. Name[Addendum]
  485. AddBlack[bp][bq][cr][dr][er][fr][gr][hr]
  486. AddWhite[ao][bo][co][cp][cq][dq][eq][fq][gq][hq][hs][iq][ir][kr]
  487. Comment[When this problem was first posted to rec.games.go, it the stone at K1 was located at L2 instead.  Without the stone at K1, black is alive.]
  488. ;
  489. AddWhite[kq][lq][ls][mq][nq][oq][pq][qo][qp][qq][ro][so]
  490. AddBlack[an][bn][cn][dn][do][eo][fo][go][ho][io][ip][jq][ko][kp][lo][lr][mo][mr][no][nr][oo][or][pn][po][pr][qn][qr][rn][rp][rq][sn]
  491. Comment[This observation leads to even more baroque problems.  However, they should be easy once you've solved #4.
  492.  
  493. 5. White to play and live]
  494. ;
  495. AddWhite[jq][ps][qr][rq][rs][sr]
  496. AddBlack[jp][kq][lq][nq][oq][pq][qp][sp][sq]
  497. AddEmpty[ip][kp][kr][lo][lr][ls][mo][mq][mr][no][nr][oo][or][pn][pr][qn][qo][rn][ro][sn][so]
  498. Comment[Or how about this one?]
  499. )
  500. )
  501.  
  502. SHAR_EOF
  503. fi
  504. exit 0
  505. #    End of shell archive
  506.